package com.ruoyi.miniapp.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单管理对象 t_order
 * 
 * @author ruoyi
 * @date 2022-10-23
 */
public class Order extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 订单id */
    private Long orderId;

    /** 订单编号 */
    @Excel(name = "订单编号")
    private String orderNumber;

    /** 订单状态:1进行中、2待支付 、3已支付、4已完成 */
    @Excel(name = "订单状态:1进行中、2待支付 、3已支付、4已完成")
    private Long orderStatus;

    /** 异常原因 */
    @Excel(name = "异常原因")
    private String abnormality;

    /** 下单时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "下单时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date orderTime;

    /** 归还时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "归还时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date giveBackTime;

    /** 床位id */
    @Excel(name = "床位id")
    private Long bedId;

    /** 用户id */
    @Excel(name = "用户id")
    private Long loginId;

    /** 租借时长 */
    @Excel(name = "租借时长")
    private String leaseTime;

    /** 状态:1正常、2异常 */
    @Excel(name = "状态:1正常、2异常")
    private Long status;

    /** 租金 */
    @Excel(name = "租金")
    private BigDecimal rent;

    /** 支付时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date paymentTime;

    public void setOrderId(Long orderId) 
    {
        this.orderId = orderId;
    }

    public Long getOrderId() 
    {
        return orderId;
    }
    public void setOrderNumber(String orderNumber) 
    {
        this.orderNumber = orderNumber;
    }

    public String getOrderNumber() 
    {
        return orderNumber;
    }
    public void setOrderStatus(Long orderStatus) 
    {
        this.orderStatus = orderStatus;
    }

    public Long getOrderStatus() 
    {
        return orderStatus;
    }
    public void setAbnormality(String abnormality) 
    {
        this.abnormality = abnormality;
    }

    public String getAbnormality() 
    {
        return abnormality;
    }
    public void setOrderTime(Date orderTime) 
    {
        this.orderTime = orderTime;
    }

    public Date getOrderTime() 
    {
        return orderTime;
    }
    public void setGiveBackTime(Date giveBackTime) 
    {
        this.giveBackTime = giveBackTime;
    }

    public Date getGiveBackTime() 
    {
        return giveBackTime;
    }
    public void setBedId(Long bedId) 
    {
        this.bedId = bedId;
    }

    public Long getBedId() 
    {
        return bedId;
    }
    public void setLoginId(Long loginId) 
    {
        this.loginId = loginId;
    }

    public Long getLoginId() 
    {
        return loginId;
    }
    public void setLeaseTime(String leaseTime) 
    {
        this.leaseTime = leaseTime;
    }

    public String getLeaseTime() 
    {
        return leaseTime;
    }
    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }
    public void setRent(BigDecimal rent) 
    {
        this.rent = rent;
    }

    public BigDecimal getRent() 
    {
        return rent;
    }
    public void setPaymentTime(Date paymentTime) 
    {
        this.paymentTime = paymentTime;
    }

    public Date getPaymentTime() 
    {
        return paymentTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("orderId", getOrderId())
            .append("orderNumber", getOrderNumber())
            .append("orderStatus", getOrderStatus())
            .append("abnormality", getAbnormality())
            .append("orderTime", getOrderTime())
            .append("giveBackTime", getGiveBackTime())
            .append("bedId", getBedId())
            .append("loginId", getLoginId())
            .append("leaseTime", getLeaseTime())
            .append("status", getStatus())
            .append("rent", getRent())
            .append("paymentTime", getPaymentTime())
            .toString();
    }
}
